package com.gupao;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

import java.util.List;

/**
 * 自定义插件测试
 *
 * @author
 * @create
 */
@Mojo(name = "gupaoedu", defaultPhase = LifecyclePhase.PACKAGE)
public class GupaoMojo extends AbstractMojo {
	@Parameter
	private String msg;

	@Parameter
	private List<String> lists;

	/**
	 * mvn clean install -DmyArgs=123456
	 */
	@Parameter(property = "myArgs")
	private String myArgs;

	public void execute() throws MojoExecutionException, MojoFailureException {
		System.out.println("gupao plugin, msg:" + msg);
		System.out.println("gupao plugin, lists:" + lists);
		System.out.println("gupao plugin, myArgs:" + myArgs);
	}
}
